<?php

//获取当前的提示内容
function getnotice() {
	$notice = session('notice');
	session('notice', null);
	return $notice;
}

//时间差
function resttime() {
	$startdate = date('Y-m-d H:i:s');
	$enddate = C('ACTIVITY_OVER');
	$cha = strtotime($enddate)-strtotime($startdate);
	if($cha<0) {
		return "000000";
	}
	
	$day = floor($cha/86400);
	$hour = floor($cha%86400/3600);
	$minute = floor($cha%3600/60);
	$second = floor($cha%60);
	
	$result = "";
	if($day<10) {
		$result.= "0".$day;
	}else{
		$result.= $day;
	}
	if($hour<10) {
		$result.= "0".$hour;
	}else{
		$result.= $hour;
	}
	if($minute<10) {
		$result.= "0".$minute;
	}else{
		$result.= $minute;
	}
	
	return $result;
}

//存储权限对应的中英文名字
function authority() {
	$result = array(
			'admin'        => '超级管理',
			'reservation'  => '订单管理',
	);

	return $result;
}











?>